﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Com.CMS263.PO;
using Com.CMS263.Util;
using Com.CMS263.BLL;
using System.Collections.Generic;

namespace Com.CMS263.Web.manage.ProdAttr
{
    public partial class PAList : System.Web.UI.Page
    {
        ProdTypeBLL ptbll = new ProdTypeBLL();
        public IList<ProdType> pt = new List<ProdType>();
        int pageSize = 20;
        public int page = 1;
        string key = "";
        protected void Page_Load(object sender, EventArgs e)
        {
            key = StringUtil.checkStr(Request["txtKey"]);
            this.lbTypeName.Text = "商品类型";
            if (!string.IsNullOrEmpty(Request["page"]))
            {
                page = int.Parse(Request["page"]);
            }
            if (page == 0)
            {
                page = 1;
            }
            if (!string.IsNullOrEmpty(key))
            {
                this.txtKey.Text = key;
            }
            key =StringUtil.checkStr(txtKey.Text);
            pt = ptbll.GetAll(page, pageSize,key);
        }
        
        public string GetPager()
        {
            int total = ptbll.GetAll(key);
            return EnPager.GetPager(total, pageSize, page, "&txtKey=" + key);
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            
        }

    }
}
